﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ConsoleMenuUI.Lib;

namespace ConsoleMenuUI.ConsoleTest
{
    class Program
    {
        static void Main(string[] args)
        {
            var cm = new ConsoleMenu()
                .AddMenuChoice(() => Console.WriteLine("This is option 1"),
                              "Option 1")
                .AddMenuChoice(() => Console.WriteLine("I'm watching a movie."),
                    "Print what you are doing")
                .AddMenuChoice(() => TestSomething(),"Run TestSomething");
            cm.ConsoleMenuOptions.EscapeKeyBahavior = EscapeKeyBehavior.PressTwiceToExit;
            cm.DrawMenu();
        }

        static void TestSomething()
        {
            string s = "This is a test.";
            Console.WriteLine("The string \"{0}\" has {1} characters",s,s.Length);
        }
    }
}
